<template>
  <div id="mypage">
    <div>
      <el-tabs v-model="activiteName" style="width: 95%;margin: auto" @tab-click="handleClick">
        <el-tab-pane label="个人中心" name="self-center">
        </el-tab-pane>
        <el-tab-pane label="卡券回收订单" name="recard-order"></el-tab-pane>
        <el-tab-pane label="低价卡券订单" name="lowPrice-order">
        </el-tab-pane>
        <el-tab-pane label="线下回收订单" name="offline-order"></el-tab-pane>
      </el-tabs>
    </div>
    <div>
      <router-view></router-view>
    </div>
  </div>
</template>

<script>
export default {
  data(){
    return{
      // activiteIndex:'1',
      activiteName:""
    }
  },
  created() {
    var path = this.$route.path.slice(1);
    console.log(path);
    this.activiteName = path
  },
  methods:{
    handleClick(tab){
      this.$router.push(`/${tab.name}`)
    }
  }
}
</script>

<style scoped>
  #mypage{
    width: 95%;
    margin: 10px auto 0;
  }
</style>
